
export const state = {
  dynamicFieldColumns: [],
};

export const mutations = {
  // 设置动态表单字段配置列表
  SET_DYNAMIC_FIELD_COLUMNS(state, columns) {
    state.dynamicFieldColumns = columns;
  },
};

export const getters = {
  fieldColumns(state) {
    return state.dynamicFieldColumns || [];
  },
};

export const actions = {
  /**
   * 设置动态表单字段表
   * @param commit
   * @param payload
   */
  setDynamicFieldColumns({ commit }, payload) {
    commit('SET_DYNAMIC_FIELD_COLUMNS', payload);
  },
};
